<#setting classic_compatible=true>
<#assign base=request.contextPath />
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X]-UA-Compatible" content="IE=edge">
	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <meta http-equiv="Content-Type" content="multipart/form-data; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- 引入通用css -->
		<link rel="stylesheet" type="text/css" href="${base}/zhgl-jzstyxx-manage/css/model.css" >
	    <#include "/common/commoncss.ftl">
		<link rel="stylesheet" type="text/css" href="${base}/zhgl-jzstyxx-manage/css/sysCustom/sysCustom.css" >
		<link rel="stylesheet" type="text/css" href="${base}/zhgl-jzstyxx-manage/css/bootstrap-table.min.css">
	    <title>自定义处理类</title>
	    <style>
	        /*单数行颜色  */
			 .table-striped>tbody>tr:nth-of-type(odd) {
			    background-color: #ffffff;
			}
			/* 双数行颜色 */
			.table-striped>tbody>tr:nth-of-type(even) {
			    background-color: #f5f5f5;
			}
			/*表头颜色  */
			 thead {
			    background-color: #f7f7f7;
			}
		  /*表格高度 */
		  .fixed-table-body{
		  height:auto;
		  }
	.his {
    	width: 800px !important;
    	margin: 30px auto;
	}
		  </style>
	</head>
	<body class="nav-md">
        <!-- 页面正文部分开始-->
        <div>
			<p>
			 <span class="glyphicon glyphicon-home"style="padding-right: 11px;"></span>
			系统管理<i class="glyphicon glyphicon-chevron-right"style="padding-left: 11px;padding-right: 11px;"></i>自定义处理类
			</p>
		</div>
		<div class="container body-content">
			<div class="panel-body" style="background:#ffffff;">
				<form id="formSearch" class="form-horizontal box1"style="padding-bottom: 0px;">
			          <div class="form-group col-sm-4 selectinput">
			               <label for="selectBydefinedName" class="col-sm-4 control-label laberinput">名称</label>
		                   <div class="col-sm-7">
			                     <input type="text" class="form-control inputbox" id="selectBydefinedName" placeholder="请输入名称">
			                </div>
			          </div>
					  <div class="form-group col-sm-4 selectinput">
			                <label for="selectByDefinedType" class="col-sm-4 control-label laberinput">类型</label>
			                <div class="col-sm-7">
			                     <select id="selectByDefinedType" name="selectByDefinedType" class="form-control inputbox">
			                     </select>
			                </div>
			          </div>
			          <div class="form-group col-sm-4 selectinput">
			                <label for="selectBydefinedVersion" class="col-sm-4 control-label laberinput">版本号</label>
			                <div class="col-sm-7">
			                     <input type="text" class="form-control inputbox" id="selectBydefinedVersion" placeholder="请输入版本号">
			                </div>
			          </div>
			          <div class="form-group col-sm-4 selectbutton" >
			                  <div class="col-sm-1">
			                        <button id="btn_query" type="button" class="btn btn-primary two-word-btn"style="background:#00796A;">
			                             <span class="fa fa-search btn-icon"></span>&nbsp;查询
			                         </button>
			                  </div>
			           </div>
			      </form>
			      <div id="toolbar" class="btn-group">
						<button style="color: #ffffff;background: #3B9ED9;"type="button" class="btn btn-default two-word-btn" onclick="addMap()">
			                    <span class="IconFont icon-add btn-icon" aria-hidden="true"></span>&nbsp;新增
			            </button>
			            <button  style="color: #ffffff;background: #7ABD3E;"type="button" style="background: #fff;"class="btn btn-default two-word-btn" onclick="modify()">
			                    <span class="IconFont icon-edit-1-copy btn-icon" aria-hidden="true"></span>&nbsp;更新
			            </button>
			            <button  style="color: #ffffff;background: #1abb9c;"type="button" class="btn btn-default four-button" onclick="updateRecord()">
		                      	<span class="fa fa-eye" aria-hidden="true"></span>&nbsp;历史记录
		               	</button>
			            <button  style="color: #ffffff;background: #FFA45A;"type="button" class="btn btn-default two-word-btn" onclick="delAll()">
		                        <span class="IconFont icon-shanchu btn-icon" aria-hidden="true"></span>&nbsp;删除
		               	</button>
		               	<!-- <button  style="color: #ffffff;background: #2f5f8a;"type="button" class="btn btn-default two-word-btn" onclick="delAll()">
		                        <span class="iconfont icon-edit-1-copy iconStyle" aria-hidden="true"></span>&nbsp;启用
		               	</button> -->
		               	<button  style="color: #ffffff;background: #f3590e;"type="button" class="btn btn-default two-word-btn" onclick="save()">
		                        <i class="fa fa-save"></i>&nbsp;下载
		               	</button>
				  </div>
				  <table id="tb_defined"  class="table table-hover"></table>
		   </div>
	    </div>
		<!-- 新增  -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"aria-hidden="true">
		     <div class="modal-dialog" >
		          <div class="modal-content add">
		               <div class="modal-header" style="padding:8px">
		                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		                    <h4 class="modal-title" id="myModalLabel">新增</h4>
		               </div>
		               <div id="" class="modal-body"style="text-align: center;">
		                    <form id="myform"class=" form-horizontal" method="POST" enctype="multipart/form-data">
		                    </form>
				            <button type="button" class="btn btn-primary saves" style="background: #3B9ED9;"onclick="add()">保存
				            </button>
				            <button type="reset" class="btn btn-primary call"  style="background: #6F7ABA;"onclick="empty()" >重置
				            </button>
				            <button type="button" class="btn btn-primary backs"   style="background: #38924D;" data-dismiss="modal">返回
				            </button>
				        </div>
		           </div>
		     </div>
		</div>
		<!--修改  -->
		<div class="modal fade" id="ModefyBymyModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"aria-hidden="true">
		     <div class="modal-dialog add" >
		          <div class="modal-content">
		               <div class="modal-header" style="padding:8px">
		                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		                    <h4 class="modal-title">修改</h4>
		               </div>
		               <div id="" class="modal-body"style="text-align: center;">
		                    <form id="modify"class=" form-horizontal" method="POST" enctype="multipart/form-data">
		                    </form>
		                    <span id="AddButton">
					            <button id="updateSave"type="button" class="btn btn-primary saves" style="background: #3B9ED9;"onclick="modifySave()">保存
					            </button>
					            <button id="updateRever"type="button" class="btn btn-primary backs" style="background: #38924D;"data-dismiss="modal">返回
					            </button>
				            </span>
				       </div>
		         </div>
		    </div>
		</div>
		<!--历史记录-->
		<div class="modal fade" id="recordBymyModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"aria-hidden="true">
		     <div class="modal-dialog his">
		          <div class="modal-content">
		               <div class="modal-header" style="padding:8px">
		                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		                    <h4 class="modal-title">更新记录</h4>
		               </div>
		               <div id="" class="modal-body"style="text-align: center;">
		                    <form id="record"class=" form-horizontal">
		                    </form>
				       </div>
		          </div>
		     </div>
		</div>
		<!--历史记录-->
		<div class="modal fade" id="recordBymyModels" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"aria-hidden="true">
		     <div class="modal-dialog his">
		          <div class="modal-content">
		               <div class="modal-header" style="padding:8px">
		                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		                    <h4 class="modal-title">记录回滚</h4>
		               </div>
		               <div id="" class="modal-body"style="text-align: center;">
		                    <form id="returnRecord"class=" form-horizontal">
		                    </form>
 		                    <button id="updateSave"type="button" class="btn btn-primary saves" style="background: #3B9ED9;">确认
					        </button>
					        <button id="updateRever"type="button" class="btn btn-primary backs" style="background: #38924D;"data-dismiss="modal">返回
					        </button> 
				       </div>
		          </div>
		     </div>
		</div>
		<!--历史记录  -->
		<script id="recordTemplate" type="text/html">
			<table id="table_hist"class="table table-hover table-striped">
				</table>
		</script>
		<!--记录回滚  -->
		<script id="returnRecordTemplate" type="text/html">
			<table class="table table-hover table-striped">
				<tr>
					<thead>
					<!--	<td>操作</td> -->
						<td>名称</td>
						<td>版本</td>
						<td>类型</td>
						<td>上次文件名</td>
						<td>更新时间</td>
						<td>操作</td>
					</thead>
		        </tr>
 				<%for(var i = 0; i < sysdefined.length; i++) {%>
 						<tr>
							<td><input type="checkbox" name="his"value="<%:=sysdefined[i].id%>"></td>
							<td><%:=sysdefined[i].definedName%></td>
							<td><%:=sysdefined[i].definedVersion%></td>
							<td><%:=sysdefined[i].definedTypeName%></td>
							<td><%:=sysdefined[i].definedContentName%></td>
							<%var date=sysdefined[i].createdTime%>
							<%date=new Date(date)%>
							<%var year =date.getFullYear();%>
							<%var month=date.getMonth()+1%>
							<%var day=date.getDate()%>
							<%var hh=date.getHours()%>
							<%var mm=date.getMinutes()%>
							<%var ss=date.getSeconds()%>
							<td><%:=[year,month,day].join("-")%>&nbsp;<%:=[hh,mm,ss].join(":")%></td>
							<td>
								<a href="/zhgl-jzstyxx-manage/logger/download?id=<%:=sysdefined[i].id%>"target="_black"><font color="blue">下载</font></a>
							</td>
						</tr>
					<%}%>
				</table>
		</script>
	<!-- 新增的模板 -->
		<script id="myFormTemplate" type="text/html">
		 <%if(app!=""){%>
 				<input type="hidden"name="id" id="id"value="<%:=app.id%>">
		 <%}%>
  	     <div class="form-group">
      		    <label for="inputBydefinedName" class="col-sm-2 mylabel control-label"style="width: 19%;"> 名称:</label>
         		<div class="col-sm-4 col-sm-me">
				 	<%if(app!=""){%>
          		  		 <input type="text" class="form-control radius" id="inputBydefinedName"name="inputBydefinedName" value="<%:=app.definedName%>"readonly="readonly" >
        		 	<%}else{%>
				         <input type="text" class="form-control radius" id="inputBydefinedName"name="inputBydefinedName" placeholder="请输入名称" maxlength=17">
			         <%}%>
                 </div>
	      </div>
	      <div class="form-group">
                <label for="inputBydefinedVersion" class="col-sm-2 mylabel control-label"style="width: 19%;">版本号:</label>
                <div class="col-sm-4 col-sm-me">
			          <%if(app!=""){%>
				           <input type="text" class="form-control radius" id="inputBydefinedVersion"name="inputBydefinedVersion" value="<%:=app.definedVersion%>">
			          <%}else{%>
            	           <input type="text" class="form-control radius" id="inputBydefinedVersion"name="inputBydefinedVersion" placeholder="请输入版本号" maxlength="17">
        	          <%}%>
		         </div>
            </div>
	        <div class="form-group">
       		    <label for="definedType" class="col-sm-2 mylabel control-label"style="width: 19%;">类型:</label>
        		<div class="col-sm-4 col-sm-me">
						<%if(app!=""){%>
						    <select id="inputByDefinedType"name="inputByDefinedType"class="form-control radius"disabled="disabled">
							</select>
						<%}else{%>
            				 <select id="inputByDefinedType"name="inputByDefinedType"class="form-control radius">
							</select>
        				<%}%>
       			</div>
    		</div>
			<div class="form-group">
        		 <label for="internetType" class="col-sm-2 mylabel control-label"style="width: 19%;">文件:</label>
       			 <div class="col-sm-4 col-sm-me">
           			 <input type="file" name="file" id="file"/>
				</div>
    		</div>
		<div style="width: 100%;">	
			<div  id="proghide" class="progress progress-striped active"style="width: 60%;margin: auto;display:none">
    			    <div id="prog" class="progress-bar" role="progressbar" aria-valuenow="" aria-valuemin="0" aria-valuemax="100" style="width:0%;">
          				  <span id="proglabel">正在启动，请稍后......</span>
       				 </div>
   		   </div>
		</div> 
		</script>
		<!-- 状态-->
		<script id="StatusTemplate" type="text/html">
			<%if(list==null||list==""){%>	
				<option value>全部</option>
			<%}%>
   	   	    <%for(var i = 0; i < dict.length; i++) {%>
				   <%if(list!=null&&list!=""){%>
						<%if(list==dict[i].dictCode){%>
    						<option value="<%:=dict[i].dictCode%>"selected="selected"><%:=dict[i].dictName%></option>
						<%}else{%>
							<option value="<%:=dict[i].dictCode%>"><%:=dict[i].dictName%></option>
						<%}%>
					<%}else{%>
						<option value="<%:=dict[i].dictCode%>"><%:=dict[i].dictName%></option>
					<%}%>
   	  		 <%}%>
		</script>
		<#include "/common/commonjs.ftl">
		<script type="text/javascript" src="${base}/zhgl-jzstyxx-manage/js/template.js"></script>
		<script type="text/javascript" src="${base}/zhgl-jzstyxx-manage/js/jquery.serializejson.min.js"></script>
		<script type="text/javascript" src="${base}/zhgl-jzstyxx-manage/js/jquery.validate.min.js"></script>
		<script type="text/javascript" src="${base}/zhgl-jzstyxx-manage/js/system/sysCustom.js"></script>
	</body>
</html>
